package com.miyu.system.pojo.system;


import cn.hutool.core.date.LocalDateTimeUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.miyu.system.utils.jpacomment.annotation.ColumnComment;
import com.miyu.system.utils.jpacomment.annotation.TableComment;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

import lombok.Data;
import org.hibernate.annotations.GenericGenerator;

/**
 * 通知公告;
 * @author : miyu
 * @date : 2024-12-29
 */
@ApiModel(value = "通知公告",description = "")
@Data
@Entity
@Table(name="sys_notice")
@TableComment("通知公告")
public class SysNotice implements Serializable,Cloneable{
    /** 主键 */
    @Id
    @TableGenerator(name="id_gen",  table="sys_id_generator", pkColumnName="table_name", pkColumnValue="sys_notice", valueColumnName="id_value", initialValue=1, allocationSize=1)
    @GeneratedValue(strategy=GenerationType.TABLE, generator="id_gen")

    @ApiModelProperty(value="主键",notes = "")
    @Column(name = "id", nullable = false,length=16 )
    @ColumnComment("主键")
    private Long id ;
    /** 公告标题 */
    @ApiModelProperty(value="公告标题",notes = "")
    @Column(name = "title_name", nullable = true,length=100 )
    @ColumnComment("公告标题")
    private String titleName ;
    /** 公告类型 */
    @ApiModelProperty(value="公告类型",notes = "")
    @Column(name = "notice_type", nullable = true,length=2 )
    @ColumnComment("公告类型")
    private String noticeType ;
    /** 内容 */
    @ApiModelProperty(value="内容",notes = "")
    @Column(name = "context", nullable = true,length=8000 )
    @ColumnComment("内容")
    private String context ;
    /** 作者 */
    @ApiModelProperty(value="作者",notes = "")
    @Column(name = "create_user", nullable = true,length=50 )
    @ColumnComment("作者")
    private String createUser ;
    /** 创建时间 */
    @ApiModelProperty(value="创建时间",notes = "")
    @Column(name = "create_date", nullable = true )
    @ColumnComment("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createDate ;
    /** 状态 */
    @ApiModelProperty(value="状态",notes = "")
    @Column(name = "status", nullable = true,length=2 )
    @ColumnComment("状态")
    private String status ;
    /** 更新时间 */
    @ApiModelProperty(value="更新时间",notes = "")
    @Column(name = "update_date", nullable = true )
    @ColumnComment("更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateDate = LocalDateTimeUtil.now();
}